import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
import Layout from '@/layout';
import Layout1 from '@/layout/layout1';

let routes = [];
// 评估管理系统
export const pgglroutes = [
    {
        path: '/pggl/ylfwsspj',
        component: Layout,
        name: '养老服务设施评级',
        children: [
            {
                path: '/pggl/ylfwsspj/fwsspjylb',
                component: () => import('@/views/pggl/ylfwsspj/fwsspjylb'),
                name: '服务设施评级一览表'
            },
            {
                path: '/pggl/ylfwsspj/fwsspjgl',
                component: () => import('@/views/pggl/ylfwsspj/fwsspjgl'),
                name: '服务设施评级管理'
            }
        ]
    },
    {
        path: '/pggl/fwsxjpg',
        component: Layout,
        name: '服务商星级评估',
        children: [
            {
                path: '/pggl/fwsxjpg/fwsxjylb',
                component: () => import('@/views/pggl/fwsxjpg/fwsxjylb'),
                name: '服务商星级一览表'
            },
            {
                path: '/pggl/fwsxjpg/fwsxjpggl',
                component: () => import('@/views/pggl/fwsxjpg/fwsxjpggl'),
                name: '服务商星级评估管理'
            }
        ]
    },
    {
        path: '/pggl/ylfwrjxypj',
        component: Layout,
        name: '养老服务人员信用评估',
        children: [
            {
                path: '/pggl/ylfwrjxypj/fwrytjt',
                component: () => import('@/views/pggl/ylfwrjxypj/fwrytjt'),
                name: '服务人员统计图'
            },
            {
                path: '/pggl/ylfwrjxypj/fwrjxypjgl',
                component: () => import('@/views/pggl/ylfwrjxypj/fwrjxypjgl'),
                name: '服务人员信用评估管理'
            }
        ]
    },

]
// 养老服务设置管理系统
export const ylfwszroutes = [
    {
        path: '/ylfwsz',
        redirect: '/ylfwsz/index',
        component: Layout,
        children: [
            {
                path: '/ylfwsz/index',
                component: () => import('@/views/ylfwsz/index'),
                name: '首页',
                type: 1,
                showHeader: true,
                header2List:[
                    {ico1: require('../assets/h0.png'), ico2: require('../assets/h0-1.png'), title: '首页'},
                    {ico1: require('../assets/t1.png'), ico2: '', title: '基础应用'},
                    {ico1: require('../assets/t2.png'), ico2: '', title: '机构管理'},
                    {ico1: require('../assets/t3.png'), ico2: '', title: '老人管理'},
                    {ico1: require('../assets/t4.png'), ico2: '', title: '服务管理'},
                    {ico1: require('../assets/t5.png'), ico2: '', title: '工单订单'},
                    {ico1: require('../assets/t6.png'), ico2: '', title: '智慧岛'},
                ]
            },
        ]
    },
    {
        path: '/ylfwsz/jjfwgl',
        component: Layout,
        name: '居家服务管理',
        children: [
            {
                path: '/ylfwsz/jjfwgl/xmrw',
                component: () => import('@/views/ylfwsz/jjfwgl/xmrw'),
                name: '项目任务'
            },
            {
                path: '/ylfwsz/jjfwgl/fwjhzd',
                component: () => import('@/views/ylfwsz/jjfwgl/fwjhzd'),
                name: '服务计划制定'
            },
            {
                path: '/ylfwsz/jjfwgl/fwrwgd',
                component: () => import('@/views/ylfwsz/jjfwgl/fwrwgd'),
                name: '服务任务工单'
            }
        ]
    },
]
// 养老服务人才培训系统
export const fwrcpxroutes = [
    {
        path: '/fwrcpx',
        component: Layout,
        redirect: '/fwrcpx/index',
        name: '养老服务人才培训系统',
        children: [
            {
                path: '/fwrcpx/index',
                component: () => import('@/views/fwrcpx/index'),
                name: '首页',
                type: 1
            }
        ]
    },
]
// 养老项目管理系统
export const ylxmglroutes = [
    {
        path: '/ylxmgl/ylfwxmgl',
        redirect: '/ylxmgl/ylfwxmgl/index',
        component: Layout,
        name: '养老服务项目管理',
        children: [
            {
                path: '/ylxmgl/ylfwxmgl/index',
                component: () => import('@/views/ylxmgl/ylfwxmgl/index'),
                name: '首页'
            },
            {
                path: '/ylxmgl/ylfwxmgl/fwqd',
                component: () => import('@/views/ylxmgl/ylfwxmgl/fwqd'),
                name: '服务清单'
            },
            {
                path: '/ylxmgl/ylfwxmgl/fwmx',
                component: () => import('@/views/ylxmgl/ylfwxmgl/fwmx'),
                name: '服务模型'
            }
        ]
    },
]
// 资金管理系统
export const zjglroutes = [
    {
        path: '/zjgl/zjgk',
        redirect: '/zjgl/zjgk/index',
        component: Layout,
        name: '资金概况',
        children: [
            {
                path: '/zjgl/zjgk/index',
                component: () => import('@/views/zjgl/zjgk/index'),
                name: '首页'
            },
        ]
    },
]
// 数据对接与统一登录系统
export const sjdjroutes = [
    {
        path: '/sjdj',
        redirect: '/sjdj/index',
        component: Layout1,
        children: [
            {
                path: '/sjdj/index',
                component: () => import('@/views/sjdj/index'),
                name: '首页',
                type: 1
            },
        ]
    },
]
// 市区平台综合监管系统
export const sqptzhjgroutes = [
    {
        path: '/sqptzhj',
        redirect: '/sqptzhj/index',
        component: Layout,
        children: [
            {
                path: '/sqptzhj/index',
                component: () => import('@/views/sqptzhj/index'),
                name: '首页',
                type: 1
            },
        ]
    },
    {
        path: '/sqptzhj/lnrksjjg',
        name:'老年人口数据监管',
        component: Layout,
        children: [
            {
                path: '/sqptzhj/lnrksjjg/lnxxcx',
                component: () => import('@/views/sqptzhj/lnrksjjg/lnxxcx'),
                name: '老年信息查询'
            },
        ]
    },
    {
        path: '/sqptzhj/ylfwssjg',
        name:'养老服务设施监管',
        component: Layout,
        children: [
            {
                path: '/sqptzhj/ylfwssjg/sqyly',
                component: () => import('@/views/sqptzhj/ylfwssjg/sqyly'),
                name: '社区养老院'
            },
            {
                path: '/sqptzhj/ylfwssjg/sqlnrfwzx',
                component: () => import('@/views/sqptzhj/ylfwssjg/sqlnrfwzx'),
                name: '社区老年人服务中心（站） '
            },
        ]
    },
    {
        path: '/sqptzhj/ylfwxxjg',
        name:'养老服务信息监管',
        component: Layout,
        children: [
            {
                path: '/sqptzhj/ylfwxxjg/ddxxgl',
                component: () => import('@/views/sqptzhj/ylfwxxjg/ddxxgl'),
                name: '订单信息管理'
            },
            
        ]
    },
    {
        path: '/sqptzhj/ylfwryxxjg',
        name:'养老服务人员信息监管',
        component: Layout,
        children: [
            {
                path: '/sqptzhj/ylfwryxxjg/fwryxxgl',
                component: () => import('@/views/sqptzhj/ylfwryxxjg/fwryxxgl'),
                name: '服务人员信息管理'
            },
            
        ]
    },
    {
        path: '/sqptzhj/pjgl',
        name:'评估管理',
        component: Layout,
        children: [
            {
                path: '/sqptzhj/pjgl/pgjgylb',
                component: () => import('@/views/sqptzhj/pggl/pgglylb'),
                name: '评估结果一览表'
            },
            
        ]
    },
]
// 数据库体系
export const sjktxroutes = [
    {
        path: '/sjktx/llrksjk',
        component: Layout,
        redirect: '/sjktx/llrksjk/index',
        name: '  老龄人口数据库',
        children: [
            {
                path: '/sjktx/llrksjk/index',
                component: () => import('@/views/sjktx/llrksjk/index'),
                name: '老龄人口数据库',
                type: 1
            }
        ]
    },
    {
        path: '/sjktx/ylfwsssjk',
        component: Layout,
        redirect: '/sjktx/ylfwsssjk/index',
        name: '养老服务设施数据库',
        children: [
            {
                path: '/sjktx/ylfwsssjk/index',
                component: () => import('@/views/sjktx/ylfwsssjk/index'),
                name: '养老服务设施数据库',
                type: 1
            }
        ]
    },
   
]
// 时间银行管理系统
export const sjyhroutes = [
    {
        path: '/sjyh',
        redirect: '/sjyh/index',
        component: Layout,
        children: [
            {
                path: '/sjyh/index',
                component: () => import('@/views/sjyh/index'),
                name: '首页',
                type: 1,
                showHeader: true,
                header2List:[
                    {ico1: require('../assets/h0.png'), ico2: require('../assets/h0-1.png'), title: '首页'},
                    {ico1: require('../assets/h1.png'), ico2: '', title: '政府'},
                    {ico1: require('../assets/h2.png'), ico2: '', title: '机构'},
                    {ico1: require('../assets/h3.png'), ico2: '', title: '志愿者'},
                ]
            },
        ]
    }
]
routes = [...routes, ...pgglroutes, ...ylfwszroutes, ...fwrcpxroutes, ...ylxmglroutes, ...zjglroutes, ...sjdjroutes, ...sqptzhjgroutes, ...sjktxroutes, ...sjyhroutes]
const createRouter = () => new Router({
    routes: routes
})

const router = createRouter()
export default router
